	$(document).ready(function(){
		
		var intval = setInterval(function()
		    {
		     
			 var $active_img = $('#headline-image-list li .active');
			 var $active_text = $('#text-list .active_text');
			 var $active_square = $('#flashbox_indicators .active_square');
		     var $next = ($('#headline-image-list li .active').next().length > 0) ? $('#headline-image-list li .active').next() : $('#headline-image-list img:first');
		     var $next2 = ($('#text-list .active_text').next().length > 0) ? $('#text-list .active_text').next() : $('#text-list li:first');
		     var $next3 = ($('#flashbox_indicators .active_square').next().length > 0) ? $('#flashbox_indicators  .active_square').next() : $('#flashbox_indicators :first');

		      $active_img.stop(true, true).fadeOut(200,function(){
			     $active_img.removeClass('active');
			     $next.fadeIn(200).addClass('active');
			     
			     $active_text.removeClass('active_text');
			     $next2.addClass('active_text');
			     
		     
			
		         $active_square.removeClass('active_square');
			     $next3.addClass('active_square');
		     });
		     
			     
			     
		  },5000);
		
	$('#flashbox_indicators li').hover(function() {
     clearInterval(intval);
	 var id = $(this).attr("id");
      var element = parseInt(id);
      	   
             var $active_img = $('#headline-image-list li .active');
			 var $active_text = $('#text-list .active_text');
			 var $active_square = $('#flashbox_indicators .active_square');
		       						      	     			 
		      $active_square.removeClass('active_square');
			  $("#flashbox_indicators :nth-child("+element+")").addClass('active_square');
			  
			    $active_text.removeClass('active_text');
			     $("#text-list :nth-child("+element+")").addClass('active_text');
			     
             $active_img.stop(true, true).fadeOut(200,function(){
             	 
             	
			     
			     $active_img.removeClass('active');
			     $("#headline-image-list li :nth-child("+element+")").addClass('active').fadeIn(200);
			     
			   
			     
		        
		     });
		    
			    
                  
			
     },
     function(){
     	
     	intval = setInterval(function()
		    {
		     
			 var $active_img = $('#headline-image-list li .active');
			 var $active_text = $('#text-list .active_text');
			 var $active_square = $('#flashbox_indicators .active_square');
		     var $next = ($('#headline-image-list li .active').next().length > 0) ? $('#headline-image-list li .active').next() : $('#headline-image-list img:first');
		     var $next2 = ($('#text-list .active_text').next().length > 0) ? $('#text-list .active_text').next() : $('#text-list li:first');
		     var $next3 = ($('#flashbox_indicators .active_square').next().length > 0) ? $('#flashbox_indicators  .active_square').next() : $('#flashbox_indicators :first');

		      $active_img.stop(true, true).fadeOut(200,function(){
			     $active_img.removeClass('active');
			     $next.fadeIn(200).addClass('active');
			     
			     $active_text.removeClass('active_text');
			     $next2.addClass('active_text');
			     
		     
			
		         $active_square.removeClass('active_square');
			     $next3.addClass('active_square');
		     });
		     
			     
			     
		  },5000);
      	
     });
   	
    });
